#include <iostream>
#include <string>

using namespace std;

int main()
{
    string str1, str2;
    char ch;
    do
    {
        cin >> str1 >> str2;
        (str1 > str2) ? (cout << str1 << endl) : (cout << str2 << endl);
        cout << "是否继续？" << endl;
        cin >> ch;
    }while(ch != 'q');

    return 0;
}
